import React, { Component, useEffect, useState } from 'react'
import { connect } from 'react-redux'
import IconSvg from "@/components/iconSvg";
import { Button, Space } from 'antd';
import './index.less'
import AuthButton from '@/HigherFunctions/AuthButton';

const DashBoard = (props: any) => {
    return (
        // <div onClick={() => props.onAddEvent()}>DashBoard -count {props.count}</div>
        <>
            <div className='dashboard_theme'>DashBoard -
                <div>
                    <Space wrap>
                        <Button type="primary">Primary Button</Button>
                        <Button>Default Button</Button>
                        <AuthButton auth={['city']}>
                            <Button type="dashed">Dashed Button</Button>
                        </AuthButton>
                        <Button type="text">Text Button</Button>
                        <AuthButton auth={['area']}>
                            <Button type="link">Link</Button>
                        </AuthButton>
                    </Space>
                </div>
                count <IconSvg name="menu/dashboard" /></div>
        </>
    )
}

const mapStateToProps = (state: { Global: { token: string } }) => {
    return {
        token: state.Global.token
    }
}

const mapDispatchToProps = (dispatch: any) => {
    return {
        onAddEvent: () => dispatch({ type: "ADD" })
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(DashBoard)

